$OpenBSD: patch-Makefile,v 1.4 2017/05/02 15:39:54 espie Exp $
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -18,13 +18,13 @@ SRC_DIRS = $(COMMON_DIR) $(UNIX_DIR) $(DERIVED_DIR) $(
 vpath %.cpp $(SRC_DIRS)
 
 INC_DIRS = $(COMMON_DIR) $(UNIX_DIR) $(DERIVED_DIR) $(AGG_DIR)/include $(COMMON_DIR)/agg-extras $(FFMPEG_DIR)/include
-INC_DIRS += /usr/local/include
+INC_DIRS += $(LOCALBASE)/include
 
 #
 # Library directories for FFmpeg and libpng
 #
 
-LIB_DIRS = $(FFMPEG_DIR)/lib /usr/local/lib
+LIB_DIRS = $(FFMPEG_DIR)/lib $(LOCALBASE)/lib
 
 #
 # Sources and Objects
@@ -52,7 +52,11 @@ LIBS = png z m
 ifeq ($(shell uname -s), Darwin)
   LIBS += c++
 else
-  LIBS += stdc++
+  ifeq ($(shell uname -s), OpenBSD)
+    LIBS += $(LIBCXX)
+  else
+    LIBS += stdc++
+  endif
 endif
 
 #
@@ -143,7 +147,7 @@ test: cfdg
 #
 
 CPPFLAGS += $(patsubst %,-I%,$(INC_DIRS))
-CPPFLAGS += -O3 -Wall -march=native -Wno-parentheses -std=c++0x
+CPPFLAGS += -Wall -Wno-parentheses -std=c++0x
 #CPPFLAGS += -g
 
 # Add this for clang
